package com.example.demo.service;

import com.example.demo.mapper.UsersMapper;
import com.example.demo.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Question UserService
 * @Date 2023/1/4 15:24
 * @Solution
 */
@Service
public class UserService {
    @Autowired
    UsersMapper usersMapper;
    public int add(String username,String password) {
        return usersMapper.add(username,password);
    }
    public User getByName(String username,String password) {
        return usersMapper.getByName(username);
    }
}
